package com.mew.sas.controller;

import com.mew.common.enm.GoldProcessType;
import com.mew.common.rest.sas.EFTSasRequest;
import com.zebra.common.concurrent.ZebraExecutorManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 转账方面 统计
 */

@RestController
@Slf4j
public class EFTController {


    @PostMapping(value = "/eft/pay")
    @ResponseBody
    public Integer eftPay(@RequestBody EFTSasRequest request){
        ZebraExecutorManager.getInstance().getDefaultExecutor().execute(() ->{
            //TODO 处理--登录-- 统计代码
            log.info("EFT Pay SAS {}", request.toString());
            if(request.getEftType() == GoldProcessType.Jewe.code()){
//                agentService.buy(request);
            }
        });
        return 1;
    }


}
